﻿// -------------------------------------------------------------------------------------------------
// <copyright file="TVCharacter.cs" company="HeterogeneousComputing.com">
// Creative Commons Attribution-ShareAlike 3.0 Unported License
// </copyright>
//
// <author>Jock</author>
//
// <date>05/08/2011</date>
//
// <summary>Implements the role class</summary>
// -------------------------------------------------------------------------------------------------
namespace TheTVDBScraper
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Runtime.Serialization; 
    using System.Text;

    /// -------------------------------------------------------------------------------------------------
    /// <summary>   A TVCharacter played by an Actor within a TVSeries or TVEpisode.  </summary>
    /// <remarks>    The class author was Jock, on the 05/08/2011. </remarks>
    /// -------------------------------------------------------------------------------------------------
    [DataContract(Name = "TVCharacter",
        Namespace = "http://www.heterogeneouscomputing.com/TheTVDBScraper", IsReference = true)]
    public class TVCharacter
    {
        #region Private Fields
            /// <summary> Name of the TVCharacter. </summary>
            private string characterName;

            /// <summary> The Actor who plays this TVCharacter. </summary>
            private Actor actor;

            /// <summary> The sort order of the TVCharacter. 1 being most important 
            /// i.e. main characters to 3 least important. </summary>
            private string sortOrder;
        #endregion

        #region Construtors

            /// -------------------------------------------------------------------------------------------------
            /// <summary>   Initializes a new instance of the TVCharacter class. </summary>
            /// <param name="name">     The name of the Character within the TVSeries. </param>
            /// <param name="playedBy"> The Actor who plays this character. </param>
            /// -------------------------------------------------------------------------------------------------
            public TVCharacter(string name, Actor playedBy)
            {
                this.characterName = name;
                this.actor = playedBy;
            }

            /// -------------------------------------------------------------------------------------------------
            /// <summary>   Prevents a default instance of the TVCharacter class from being created. </summary>
            /// -------------------------------------------------------------------------------------------------
            private TVCharacter()
            {
            }
        #endregion

        #region Public Properties

            /// -------------------------------------------------------------------------------------------------
            /// <summary>   Gets the role name i.e. TVCharacter's Name. </summary>
            /// <value> The role name. </value>
            /// -------------------------------------------------------------------------------------------------
            [DataMember(EmitDefaultValue = false)]
            public string Name
            {
                get
                {
                    return this.characterName;
                }

                set
                {
                    this.characterName = value;
                }
            }

            /// -------------------------------------------------------------------------------------------------
            /// <summary>   Gets the Actor who plays this Role. </summary>
            /// <value> The Actor. </value>
            /// -------------------------------------------------------------------------------------------------
            [DataMember(EmitDefaultValue = false)]
            public Actor PlayedBy
            {
                get
                {
                    return this.actor;
                }

                set
                {
                    this.actor = value;
                }
            }

            /// -------------------------------------------------------------------------------------------------
            /// <summary>   Gets or sets the sort order. The sort order of the TVCharacter. 1 being most important 
            /// i.e. main characters to 3 least important. </summary>
            /// <value> The sort order. </value>
            /// -------------------------------------------------------------------------------------------------
            [DataMember(EmitDefaultValue = false)]
            public string SortOrder
            {
                get
                {
                    return this.sortOrder;
                }

                set
                {
                    this.sortOrder = value;
                }
            }
        #endregion
    }
}

/// -------------------------------------------------------------------------------------------------
// End of TVCharacter.cs
/// -------------------------------------------------------------------------------------------------
